|
|
|
|
|
|
|
(table continued from previous page) |
|
|
|
|
| Control | Property | Setting | | Top | 3000 | | Width | 3000 | | Command Button | Name | Command1 | | Caption | Refresh | | Height | 300 | | Left | 2580 | | Top | 3480 | | Width | 1200 |
|
|
|
|
|
|
Figure 17.8.
Laying out the MULTIUS3.FRM form. |
|
|
|
|
|
|
|
|
Only two lines of Visual Basic code are needed to complete the form. Add the following lines to the Command1_Click event. These two lines update both data controls and their associated grids: |
|
|
|
|
|
|
|
|
Private Sub Command1_Click()
Data1.Refresh
Data2.Refresh
End Sub |
|
|
|
|
|
|
|
|
Save the form as MULTIUS3.FRM and the project as MULTIUS3.VBP, and then run the project. Now you're ready to test the cascading updates and deletes. |
|
|
|
|
|
|
|
|
Running the Cascading Demo Project |
|
|
|
|
|
|
|
|
When you run the project, you see the two tables displayed in each grid, side by side. First, test the update cascade by editing one of the records in the Valid Types table. Select the first |
|
|
|
|
|